package com.lgh.springframework;

import java.util.HashMap;
import java.util.Map;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname BeanFactory
 * @description
 * @date 2023/02/21 20:30
 * <p>
 * ******************************************************
 */
public class BeanFactory {
    private final Map<String, BeanDefinition> beanDefinitionMap = new HashMap<>();

    public BeanDefinition getBean(String name) {
        return beanDefinitionMap.get(name);
    }

    public void registerBeanDefinition(String name, BeanDefinition beanDefinition) {
        beanDefinitionMap.put(name, beanDefinition);
    }
}
